import { Entity, PrimaryUuid, Realname, Openid, Mobile, Boolean, Gender, Tags, CreateDate, UpdateDate, Cover, Code, Images, Desc, RichText, Digdit, Jsonb, GymPlaceId } from '@sker/core'
/**
 * 记录教练信息，包括教练ID、教练姓名、性别、专业方向、从业年限等字段。
 * 
 */
@Entity({
    name: 'gym_teacher',
})
export class GymTeacher {
    static title: string = `教练`;
    static resource: string = `gym_teacher`;

    @PrimaryUuid({
        primaryKeyConstraintName: "PK_GYM_TEACHER_ID"
    })
    id!: string;

    @Code({ comment: '类型' })
    type: string;

    @GymPlaceId({ comment: '授课场地', nullable: true })
    place_id: string;

    @Jsonb({ comment: '排班时间', nullable: true })
    time_range: Date[];

    @Jsonb({ label: '排班信息', nullable: true })
    week_times: { week: string[], times: any[] }[];

    @Realname()
    realname!: string;

    @Mobile()
    mobile!: string;

    @Digdit({ comment: '教练评分' })
    score: number;

    @Code({ comment: '教练等级', default: '' })
    level: string;

    @Gender()
    sex!: number;

    @Openid({ nullable: true, default: '' })
    openid!: string;

    @Cover()
    avatar!: string;

    @Tags({
        comment: '标签',
        default: []
    })
    tags!: string[]

    @Boolean({ comment: '推荐' })
    is_feed!: boolean;

    @Images({ label: '图集' })
    images: string[];

    @Desc({ label: '简介' })
    desc: string;

    @RichText({ label: '详情' })
    content: string;

    @CreateDate({
        comment: '创建日期'
    })
    create_date!: Date;

    @UpdateDate({
        comment: '更新日期'
    })
    update_date!: Date;
}